- name: make the app be real
  hosts: os-masters:os-masters-stg
  user: root
  gather_facts: True

  vars_files:
    - /srv/web/infra/ansible/vars/global.yml
    - "/srv/private/ansible/vars.yml"
    - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml

  roles:
  # The openshift/project role breaks if the project already exists:
  # https://pagure.io/fedora-infrastructure/issue/6404
  - role: openshift/project
    app: waiverdb
    description: waiverdb
    appowners:
    - ralph
    - mjia
    - dcallagh
  - { role: openshift/object, app: waiverdb, template: secret.yml }
  #- { role: openshift/secret-file
  #  , app: waiverdb
  #  , secret_name: waiverdb-stg-secret
  #  , key: client_secrets.json
  #  , template: client_secrets.json
  #  }
  - { role: openshift/object, app: waiverdb, file: imagestream.yml }
  - { role: openshift/object, app: waiverdb, template: configmap.yml }
  - { role: openshift/object, app: waiverdb, file: service.yml }
  - { role: openshift/object, app: waiverdb, file: route.yml }
  - { role: openshift/object, app: waiverdb, file: deploymentconfig.yml }
  - { role: openshift/rollout, app: waiverdb, name: waiverdb-web }
